<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
        <tr>
            <th class="text-center">
                <div>ID</div>
            </th>
            <th class="text-center" width="17%">图书名称</th>
            <th class="text-center" width="14%">专业/科目</th>
            <th class="text-center" width="10%">
                <span th:if="${selaSwitch}=='3'">原价/销售价/会员价</span>
                <span th:if="${selaSwitch}!='3'">原价/销售价</span>
            </th>
            <th class="text-center" width="10%">作者</th>
            <th class="text-center" width="12%">出版社</th>
            <th class="text-center" width="12%">出版时间</th>
            <th class="text-center" width="10%">ISBN</th>
            <th class="text-center" width="10%">库存</th>

        </tr>
        </thead>
    </table>
    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover table-xs-content">
            <tbody id="tbodyMaterial">
            <tr class="jqgfirstrow" role="row">
                <td role="gridcell">
                    <div class="table-first-id">&nbsp;</div>
                </td>
                <td class="text-center" width="17%"></td>
                <td class="text-center" width="14%"></td>
                <td class="text-center" width="10%"></td>
                <td class="text-center" width="10%"></td>
                <td class="text-center" width="12%"></td>
                <td class="text-center" width="12%"></td>
                <td class="text-center" width="10%"></td>
                <td class="text-center" width="10%"></td>
            </tr>
            <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                <td colspan="9" class="text-center">
                    <div class="noDataTipsBox">
                        <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                    </div>
                </td>
            </tr>
            <tr th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="book : ${dataMap['list']}" th:attrappend="data-id=${book['id']},data-name=${book['bookName']},id='book-'+${book['id']}">
                <td class="text-center">
                    <input th:type="${#strings.isEmpty(selectType)}?'radio':${selectType}" name="bookId" class="i-checks" th:attrappend="data-id=${book['id']},data-name=${book['bookName']},id='book-'+${book['id']},data-price=${book['realPrice']}" th:title="${book['bookName']}" th:value="${book['id']}">
                </td>
                <td class="text-center" th:text="${book['bookName']}"></td>
                <td class="text-center">
                    <th:block th:if="!${#lists.isEmpty(book['subjectList'])}">
                        <span class="pie" th:each="subject,subIndex : ${book['subjectList']}">
                            <th:block th:text="${subject['subjectName']}+'/'"></th:block>
                            <th:block th:if="!${#lists.isEmpty(subject['childSubjectList'])}" th:each="child,index : ${subject['childSubjectList']}">
                                <th:block th:if="${index.last} == false" th:text="${child['subjectName']}+'/'"></th:block>
                                <th:block th:if="${index.last} == true" th:text="${child['subjectName']}"></th:block>
                            </th:block>
                            <th:block th:if="${#lists.isEmpty(subject['childSubjectList'])}">全部科目</th:block>
                            <th:block th:if="${subIndex.last}==false" th:utext="'<br/>'"></th:block>
                        </span>
                    </th:block>
                    <th:block th:if="${#lists.isEmpty(book['subjectList'])}">
                        <span class="pie">—</span>
                    </th:block>
                </td>
                <td class="text-center">
                    <span th:if="${selaSwitch}=='3'" th:text="${book['rawPrice']}+'/'+${book['realPrice']}+'/'+${book['memberPrice']}"></span>
                    <span th:if="${selaSwitch}!='3'" th:text="${book['rawPrice']}+'/'+${book['realPrice']}"></span>
                </td>
                <td class="text-center" th:text="${book['author']}"></td>
                <td class="text-center" th:text="${book['bookPress']}"></td>
                <td class="text-center" th:text="${#strings.substring(book['publishTime'],0,10)}"></td>
                <td class="text-center" th:text="${book['bookISBN']}"></td>
                <td class="text-center" th:text="${book['stockNum']}"></td>
            </tr>
            </tbody>
        </table>
    </div>
    <!-- 分页，开始 -->
    <div data-th-replace="layout/adminPage"></div>
    <!-- 分页，结束 -->
</div>
</html>